﻿var core = (function () {
    function initIndex() {
        try {
            com._cInitPage();
            soul.addservice({
                QueryMessageInfo: {
                    taskguid: "6a6735d4-07db-4974-b2e6-51910c75e3b0",
                    dataguid: undefined,
                    datatype: "QueryMessageInfo",
                    xmldata: "<Document TaskGuid=\"6a6735d4-07db-4974-b2e6-51910c75e3b0\" DataType=\"QueryMessageInfo\"><MessageGuid Type=\"GUID\"></MessageGuid ><Keyword Type=\"TEXT\"></Keyword><AppName Type=\"TEXT\"></AppName><OUGuid Type=\"GUID\">" + soul.userid + "</OUGuid><OUName Type=\"TEXT\"></OUName><DataType Type=\"TEXT\"></DataType ><Status Type=\"TEXT\">所有</Status><Content Type=\"TEXT\"></Content><Priority Type=\"TEXT\"></Priority><BeginTime Type=\"DATE\"></BeginTime><EndTime Type=\"DATE\"></EndTime><RelationStatus Type=\"TEXT\"></RelationStatus><SortMethod Type=\"TEXT\">StartTime</SortMethod><OrderMethod Type=\"TEXT\">desc</OrderMethod><PageSize Type=\"LONG\">20</PageSize><CurrentPage Type=\"LONG\">0</CurrentPage></Document>"
                }
            });
            var _1c = service.EasyTransformData("QueryMessageInfo", false);
            var _$1c = com._cGetXmlObj(_1c);
            _$1c.find("MessageInfo").each(function (i, n) {
                $(".work").append("<li path='" + $(n).find("URL").text() + "' msg='" + $(n).find("AppName").text() + "' >[发起人：<font style='color:Orange; font-weight:bold;'>" + $(n).find("AuthorName").text() + "</font>][开始时间：<font style='color:Green; font-weight:bold;'>" + $(n).find("StartTime").text() + "</font>]" + $(n).find("Description").text() + "</li>");
            });
            $(".work li").click(function () {
                soul.grandfather.AddTab($(this).attr("msg"), $(this).attr("path"), "user_home", "mtabmenu", false);
            });
        } catch (e) {
            com._cLog("initIndex" + e.description, "error");
        }
    }

    return {
        Init: function () {
            initIndex();
        }
    }
})()